# P280
# 字典
dictionaryJson = {
    "name": "臭猪头",
    "age": 26,
    "gender": "女",
    "height": 1.53
}
dictionaryTwo = {
    "1": "臭猪头",
    "2": {"2": "3", "5": 3},
    "3": "女",
    "4": 1.53
}

# 修改字典
dictionaryJson["name"] = "大洋芋"
print(dictionaryJson)
# 取值
name = dictionaryJson["name"]
print(name)
# 增加
dictionaryJson["newKey"] = "新的值"
print(dictionaryJson)
# 删除
del dictionaryJson["newKey"]
print(dictionaryJson)
# 统计键值对数量
print(len(dictionaryJson))
# 合并字典
dictionaryJson.update(dictionaryTwo)
print(dictionaryJson["2"])
